#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>


void* another_calloc(size_t nmemb, size_t size){
    if (nmemb == 0 | size == 0){
        return NULL;
    }
    
    size_t nbytes = nmemb * size;

    // nmemb == buf_size / size, a good way to check overflow

    void* ptr = malloc(nbytes);
    if (ptr != NULL){
        memset(ptr, 0, nbytes);
    }
    return ptr;
}


int main(){

    return 0;
}
